﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using  System.Data;

/// <summary>
/// Summary description for ThanhVienBLL
/// </summary>
public class ThanhVienBLL
{
    IThanhVien itvien;
	public ThanhVienBLL()
	{
		//
		// TODO: Add constructor logic here
		//
        itvien = new DALThanhVien();
	}

    public bool CheckLogin(string email, string password)
    {
        return itvien.CheckLogin(email,password);
    }

    public ThanhVien SelectByEmail(string email)
    {
        return itvien.SelectByEmail(email);
    }

    public string InsertMember(ThanhVien tv)
    {
        return itvien.Insert(tv);
    }

    public string RecoveryPassword(string email)
    {
        return itvien.PasswordRecovery(email);
    }

    public string ChangePassword(string email, string oldpass, string newpass)
    {
        return itvien.ChangePassword(email,oldpass,newpass);
    }

    public string ChangeInfoMember(ThanhVien tv)
    {
        return itvien.ChangeInfoMember(tv);
    }

    public DataTable getEmail()
    {
        return itvien.getEmail();
    }

    public bool deteleEmail(string email)
    {
        return itvien.DeleteEmail(email);
    }

    public bool updateQuyen(string email,int maquyen)
    {
        return itvien.updateQuyen(email,maquyen);


    }


}